package cn.tedu.spring.eg1;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestProduct {
    @Test
    public void Test01(){
//        注解注入的注意点: 包名必须要正确,否则找不到对应的注解
        ApplicationContext context =
                new AnnotationConfigApplicationContext("cn.tedu.spring.eg1");
        Product product = context.getBean(Product.class);

        System.out.println(product);
    }
}
